package com.forenow.demo.demo5;

public class NewTest {
    public static void main(String[] args) {
        Singleton s=Singleton.getIntstance();
        Singleton t=Singleton.getIntstance();
        s.setName("tom");
        System.out.println(s.getName());
        System.out.println(t.getName());  //同一个对象
    }
}
